import "./assets/styles/reset.less"
import App from './App.vue'
import router from './router'
// 注释掉的是全局引入element-plus
// import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import piniaPluginPersist from 'pinia-plugin-persist' //引入pinia数据持久化插件

const app = createApp(App)


// 屏蔽错误信息
app.config.errorHandler = () => null;
// 屏蔽警告信息
app.config.warnHandler = () => null;

//注册pinia
app.use(createPinia())
app.use(createPinia().use(piniaPluginPersist))//安装插件

//自动导入Element-plus组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// 注册路由
app.use(router)
app.mount('#app')
